import api from "@/request/api";
export default {
    namespaced: true,
    state() {
        return {
            menulists: []
        }
    },
    mutations: {
        setState(state: any, menulists: any) {
            state.menulists = menulists
        }
    },
    actions: {
        getmenulist(context: any) {
            api.menulist().then((res: any) => {
                console.log(res);
                if (res.code == 200) {
                    context.commit("setState", res.list)
                }
            });

        },
    },
    getters: {
        menulists(state: any) {
            return state.menulists
        },
    }
}